Skip to content

Conversation

@spboyer
Copy link

@spboyer spboyer commented Dec 18, 2025

Description

This PR fixes issue #229 where newly triggered workflow runs required manual refresh to see updates in the UI. The extension now automatically polls for workflow run updates and reflects changes in real-time.

Changes

Enhanced Polling Mechanism

  • Added checks for window focus and view visibility before polling to prevent unnecessary API calls
  • Enhanced logging to show run status and conclusion during polling attempts
  • Improved cleanup of polling intervals when runs complete or polling attempts are exhausted

Key Improvements

  1. Respects window focus and view visibility, optimizing API usage
  2. Workflow runs now update automatically without requiring manual refresh
  3. Proper cleanup prevents memory leaks and unnecessary API calls

Related Issues

Fixes #229

Testing

The fix ensures that:

  • When a new workflow is triggered, it automatically appears and updates in the extension view
  • Re-running workflows shows progress updates in real-time
  • Polling stops when runs complete
  • API calls are minimized when the window is not focused or the view is not visible

Copilot AI review requested due to automatic review settings December 18, 2025 20:54
@spboyer spboyer requested a review from a team as a code owner December 18, 2025 20:54
@spboyer spboyer requested review from cschleiden and thyeggman and removed request for Copilot December 18, 2025 20:54
@spboyer
Copy link
Author

spboyer commented Dec 18, 2025

Related #285

Copilot AI review requested due to automatic review settings December 19, 2025 15:45
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements an automatic polling mechanism to update workflow runs in real-time without requiring manual refresh, addressing issue #229. The solution adds intelligent polling that respects window focus and view visibility to minimize unnecessary API calls.

Key changes include:

  • Automatic polling for active workflow runs (in_progress, queued, waiting, requested) with a 4-second interval for up to 15 minutes
  • Window focus and view visibility tracking to pause polling when the extension is not in use
  • Enhanced workflow trigger command that waits for new runs to appear and automatically starts polling them

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
src/treeViews/workflows.ts Exports WorkflowsTreeNode type to enable access from other modules
src/treeViews/workflowRunTreeDataProvider.ts Adds automatic polling initiation for active workflow runs when tree nodes are created
src/treeViews/treeViews.ts Tracks workflow tree view visibility state and notifies the store
src/store/workflowRun.ts Unconditionally clears job cache on run updates to ensure polling fetches latest job status
src/store/store.ts Implements polling mechanism with focus/visibility checks and cleanup logic for completed runs
src/extension.ts Registers window state change handler to track focus state
src/commands/triggerWorkflowRun.ts Enhanced to detect newly triggered runs and automatically start polling them

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

spboyer and others added 2 commits December 19, 2025 10:51
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

When running a new workflow, you have to manually click refresh and there are not automatic updates.

1 participant